package com.liujg.future.model.entity;

import com.liujg.future.model.resp.Goods;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

@Document("category_top")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class CategoryTop {

    @Id
    private String id;

    /**
     * 一级分类名称
     */
    private String name;

    /**
     * 一级分类图片
     */
    private String picture;

    /**
     * 一级分类图片集
     */
    private List<String> imageBanners;

    /**
     * 二级分类集合
     */
    private List<CategoryChildren> children;

    @Data
    public static class CategoryChildren {

        /**
         * 二级分类id
         */
        private String id;

        /**
         * 二级分类名称
         */
        private String name;

        /**
         * 二级分类图片
         */
        private String picture;

        private String parentId;

        private String parentName;

        /**
         * 商品集合
         */
        private List<Goods> goods;

        private String categories;

        private String brands;

        private String saleProperties;

    }

}
